import Vue from 'vue'
import VueRouter from 'vue-router'
import homePage from "@/views/homePage"
import LoginPage from "@/views/loginView"
import echartsView from "@/views/echartsView"

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    redirect: '/echarts',
    name: 'home',
    component: homePage
  },
  {
    path: '/login',
    name: 'login',
    component: LoginPage
  },
  {
    path: '/echarts',
    name: 'echarts',
    component: echartsView
  }
]

const router = new VueRouter({
  routes
})

export default router
